package practice3;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class P8748 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long timeSteamp = sc.nextLong();
        SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
        Date date=new Date();
        date.setTime(timeSteamp-8*3600*1000);   //东八区比格林威治时间快8个小时,故减去快的8个小时
        String ans = sdf.format(date);
        System.out.println(ans);
    }
}
